<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../../../css/common.css" media="all">
	</head>

	<body>
		<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-body">
							<div class="layui-form-item layui-layout-admin" style="display: flex;text-align: center;margin: 0;">
								<div style="flex: 1;">
									<button class="layui-btn" data-type='integral' id="integral">积分</button>
								</div>
								<div style="flex: 1;">
									<button class="layui-btn" data-type='balance' id="balance">余额</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<script src="../../../../layuiadmin/layui/layui.js"></script>
		<script src="../../../../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../../js/common.js"></script>
		<script>
			layui.config({
				base: '../../../../layuiadmin/' //静态资源所在路径
			}).extend({
				index: 'lib/index' //主入口模块
			}).use(['index', 'table', 'layer'], function() {
				var table = layui.table,
					$ = layui.$,
					layer = layui.layer,
					admin = layui.admin;

				$('.test-table-operate-btn .layui-btn').on('click', function() {
					var type = $(this).data('type');
					active[type] ? active[type].call(this) : '';
				});
				
				$("#integral").on('click',function(){
					var index = parent.layer.getFrameIndex(window.name);
					var data = [];
					var _data = {};
						_data.type = 1;
						_data.skuid = 101;
						_data.skuname = "积分";
					data.push(_data);
					parent.getdata(data, 0);
					parent.layer.close(index); //再执行关闭
				});
				$("#balance").on('click',function(){
					var index = parent.layer.getFrameIndex(window.name);
					var data = [];
					var _data = {};
						_data.type = 2;
						_data.skuid = 100;
						_data.skuname = "余额";
					data.push(_data)
					parent.getdata(data, 0)
					parent.layer.close(index); //再执行关闭
				});
			});
		</script>
	</body>

</html>
